package com.wangjinhai.controller;

import com.wangjinhai.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 王金海
 * @Description:
 * @Date: Created by Administrator on 2018/8/14.
 * @Modified By:
 */
@RestController
public class UserController {

    @Value("${user.age}")
    private String age;

    @Autowired
    private UserService userService;

    @GetMapping("sayHi")
    public String sayHi(@RequestParam("message") String message){
        return userService.sayHi(message+"---------------"+age);
    }
}
